package com.ruoyi.project.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.GyWarpingMapper;
import com.ruoyi.project.domain.GyWarping;
import com.ruoyi.project.service.IGyWarpingService;

/**
 * 工艺设计整经表Service业务层处理
 * 
 * @author xiangjun
 * @date 2021-12-14
 */
@Service
public class GyWarpingServiceImpl implements IGyWarpingService 
{
    @Autowired
    private GyWarpingMapper gyWarpingMapper;

    /**
     * 查询工艺设计整经表
     * 
     * @param id 工艺设计整经表主键
     * @return 工艺设计整经表
     */
    @Override
    public GyWarping selectGyWarpingById(Long id)
    {
        return gyWarpingMapper.selectGyWarpingById(id);
    }

    /**
     * 查询工艺设计整经表列表
     * 
     * @param gyWarping 工艺设计整经表
     * @return 工艺设计整经表
     */
    @Override
    public List<GyWarping> selectGyWarpingList(GyWarping gyWarping)
    {
        return gyWarpingMapper.selectGyWarpingList(gyWarping);
    }

    /**
     * 新增工艺设计整经表
     * 
     * @param gyWarping 工艺设计整经表
     * @return 结果
     */
    @Override
    public int insertGyWarping(GyWarping gyWarping)
    {
        gyWarping.setCreateTime(DateUtils.getNowDate());
        return gyWarpingMapper.insertGyWarping(gyWarping);
    }

    /**
     * 修改工艺设计整经表
     * 
     * @param gyWarping 工艺设计整经表
     * @return 结果
     */
    @Override
    public int updateGyWarping(GyWarping gyWarping)
    {
        gyWarping.setUpdateTime(DateUtils.getNowDate());
        return gyWarpingMapper.updateGyWarping(gyWarping);
    }

    /**
     * 批量删除工艺设计整经表
     * 
     * @param ids 需要删除的工艺设计整经表主键
     * @return 结果
     */
    @Override
    public int deleteGyWarpingByIds(Long[] ids)
    {
        return gyWarpingMapper.deleteGyWarpingByIds(ids);
    }

    /**
     * 删除工艺设计整经表信息
     * 
     * @param id 工艺设计整经表主键
     * @return 结果
     */
    @Override
    public int deleteGyWarpingById(Long id)
    {
        return gyWarpingMapper.deleteGyWarpingById(id);
    }
}
